﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DarkPassenger
{
    public partial class MenuProductos_ProductoConsolaSeleccionado : Form
    {
        public MenuProductos_ProductoConsolaSeleccionado(DataGridViewSelectedCellCollection cell)
        {
            InitializeComponent();
            this.txtTipoProducto.Text = cell[0].Value.ToString();
            this.txtIDConsola.Text = cell[1].Value.ToString();
            this.txtIDProducto.Text = cell[2].Value.ToString();
            this.txtNombre.Text = cell[3].Value.ToString();
            this.txtConsola.Text = cell[4].Value.ToString();
            this.txtStock.Text = cell[5].Value.ToString();
            this.txtPrecio.Text = cell[6].Value.ToString();
            this.txtDescripcion.Text = cell[7].Value.ToString();
            this.txtFabricante.Text = cell[8].Value.ToString();
            this.txtGenero.Text = cell[9].Value.ToString();
            this.txtClasificacion.Text = cell[10].Value.ToString();
            this.PicBox.ImageLocation = cell[11].Value.ToString();
            this.txtFechaSalida.Text = cell[12].Value.ToString();

            //float PrecioVenta = (float)cell[6].Value.;
            //PrecioVenta = PrecioVenta + (PrecioVenta * 20) / 100;

            string a = cell[6].Value.ToString();
            Decimal aa = Convert.ToDecimal(a);

            Decimal PrecioVenta = aa + (aa*20)/100;

            this.txtPrecioVenta.Text = PrecioVenta.ToString();

        }


    }
}
